projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ce73f8
)
vmx: Disable vPMU feature by default
author
Keir Fraser
<keir.fraser@citrix.com>
Tue, 3 Nov 2009 08:40:40 +0000
(08:40 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Tue, 3 Nov 2009 08:40:40 +0000
(08:40 +0000)
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
xen/arch/x86/hvm/vmx/vpmu.c
patch
|
blob
|
history
diff --git
a/xen/arch/x86/hvm/vmx/vpmu.c
b/xen/arch/x86/hvm/vmx/vpmu.c
index d9f15097544d37ab7f5e1223b305bbf8dee2e6ca..2d457d3b73ca6c4e2bc4e72e52a5eecfb9551c92 100644
(file)
--- a/
xen/arch/x86/hvm/vmx/vpmu.c
+++ b/
xen/arch/x86/hvm/vmx/vpmu.c
@@
-31,6
+31,9
@@
#include <public/hvm/save.h>
#include <asm/hvm/vmx/vpmu.h>
+static int __read_mostly opt_vpmu_enabled;
+boolean_param("vpmu", opt_vpmu_enabled);
+
int vpmu_do_wrmsr(struct cpu_user_regs *regs)
{
struct vpmu_struct *vpmu = vcpu_vpmu(current);
@@
-79,6
+82,9
@@
void vpmu_initialise(struct vcpu *v)
{
struct vpmu_struct *vpmu = vcpu_vpmu(v);
+ if ( !opt_vpmu_enabled )
+ return;
+
if ( vpmu->flags & VPMU_CONTEXT_ALLOCATED )
vpmu_destroy(v);